package com.ruoyi.labdata.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ruoyi.labdata.domain.LabFlowNode;

/**
 * 流程节点Mapper接口
 * 
 * @author winner pan
 * @date 2022-03-06
 */
public interface LabFlowNodeMapper 
{
    /**
     * 查询流程节点
     * 
     * @param nodeId 流程节点ID
     * @return 流程节点
     */
    public LabFlowNode selectLabFlowNodeById(Long nodeId);

    /**
     * 查询流程节点列表
     * 
     * @param labFlowNode 流程节点
     * @return 流程节点集合
     */
    public List<LabFlowNode> selectLabFlowNodeList(LabFlowNode labFlowNode);

    /**
     * 新增流程节点
     * 
     * @param labFlowNode 流程节点
     * @return 结果
     */
    public int insertLabFlowNode(LabFlowNode labFlowNode);

    /**
     * 修改流程节点
     * 
     * @param labFlowNode 流程节点
     * @return 结果
     */
    public int updateLabFlowNode(LabFlowNode labFlowNode);

    /**
     * 删除流程节点
     * 
     * @param nodeId 流程节点ID
     * @return 结果
     */
    public int deleteLabFlowNodeById(Long nodeId);

    /**
     * 批量删除流程节点
     * 
     * @param nodeIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteLabFlowNodeByIds(Long[] nodeIds);
    
    public List<LabFlowNode> getAllFlowNodeByWorkflowId(Long workflowId);
    
    public LabFlowNode getLabFlowNodeByworkflowIdAndNodeName(@Param("workflowId")Long workflowId, @Param("nodeName") String nodeName);
    
    public List<Long> getUserIdByRole(@Param("roleIds") String roleIds);
    
    public List<Long> getUserIdByDeptRole(@Param("roleIds") String roleIds, @Param("ancestors") String ancestors, @Param("deptId") Long deptId);
}
